<%@page contentType="text/html; charset=utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>  
    <title>添加已借书籍</title>
      <script type="text/javascript" src="js/jquery.js" charset="gb2312"></script>
  	  <script type="text/javascript" src="js/date.js" charset="gb2312"></script>
  	  <script type="text/javascript" src="js/book.js" charset="gb2312"></script> 
  </head>
  
  <body>
  <center>
   <form action="adminBook!doAdd.action" method="post" name="addform">
   		<table>
   			<tr>
				<th>书目编号</th>
				<th>
					<input type="text" name="book.bookid"/>
				</th>
			</tr>
			<tr>
				<th>书名</th>
				<th>
					<input type="text" name="book.bookname" id="bNameId"/>
					<span style="color:red;display:none" id="booknameErrorId">aa</span>
				</th>
			</tr>
			<tr>
				<th>所属类别</th>
				<th>
					<input type="text" name="book.bookkind"/>
				</th>
			</tr>
			<tr>
				<th>所借阅状态</th>
				<th>
					<input type="text" name="book.status"/>
				</th>
			</tr>
   		</table>
   		<input type="button" value="添加" onclick="add()"/>
   		<script type="text/javascript">
	  	  var oBooknameCtl = $("#bNameId");
	  	  var oBooknameSpan = $("#booknameErrorId");
	  	  oBooknameCtl.blur(function(){
				if(oBooknameCtl.val()==""){
					oBooknameSpan.html("书籍名称不能为空").show();
					return;
				}
			});
			oBooknameCtl.keydown(function(){
				oBooknameSpan.hide();
			});
	  </script>
   </form>
  </center>
  </body>
</html>
